<@master template="master/master-p2p" title="新增用户角色">

<div class="detailsBox">


		<div class="openBox">
		<h3>
			<i class="jtIco"></i>新增角色
		</h3>
		 <div class="detaiTab">
		   <form action="/admin/user/Rest/saveUserRole" method="post" class="action-ajax-form">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tbody>
						<tr>
							<td class="bg" align="right" width="15%">用户名:</td>
							<td>${user.name}</td>
							
						</tr>
						<tr>
							<td class="bg" align="right" width="15%">手机号:</td>
							<td>${user.mobile}</td>
						</tr>
						<tr>
							<td class="bg" align="right" width="15%">员工账号:</td>
							<td>${user.account}</td>
						</tr>
						<tr>
							<td class="bg" align="right" width="15%">角色类型:</td>
							<td> <select id="roleSelect" name="roleSelect">
								<option value="">--请选择--</option>
								<#list roleList as role>
									<option value="${role.id}">${role.roleName}</option>
								</#list>
							</select>
							</td>
						</tr>
						<tr>
							<td class="bg" align="right" width="15%"></td>
							<td>
								<input type="hidden" name="userId" value="${user.id}" />
								<input type="hidden" id="roleId" name="roleId" value=""/>
								<input type="submit" class="btn_auto_30 btn_blue" value="保存">
								<a class="btn_auto_30 btn_blue ml10" href="/admin/user/index" target="_self">取消</a>
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
			
	</div>

	<div class="openBox">
	<h3>
	<i class="jtIco"></i>用户已有角色
	</h3>
		<div class="mt20">
			<@pagination paginationInfo="paginationInfo"/>
		</div>
	</div>
	
	
	
</div>
<@js>

  $("#roleSelect").change(function(){
 	 $("#roleId").val($(this).find("option:selected").val());
  });


</@js>
<@jsRender/> 
</@master>